<#import "/ftl/mainAdmin.ftl" as page>

<@page.mainTemplate styleSheet="rolemanageCss" jsFile="rolemanageJs" current="roleManage">
  	<div class="page-content">
        <!-- BEGIN PAGE HEAD-->
        <div class="page-head">
            <!-- BEGIN PAGE TITLE -->
                <div class="page-title">
                    <h1>编辑角色
                        <small>编辑角色页面</small>
                    </h1>
                </div>
            <!-- END PAGE TITLE -->
        </div>
        <!-- END PAGE HEAD -->
        <!-- BEGIN PAGE BREADCRUMB -->
        <ul class="page-breadcrumb breadcrumb">
            <li>
	            <a href="${context}/base/index_ftl">首页</a>
	            <i class="fa fa-circle"></i>
	        </li>
            <li>
                <span class="active">编辑角色管理</span>
            </li>
        </ul>
        <!-- END PAGE BREADCRUMB -->
        <!-- BEGIN PAGE BASE CONTENT -->
        <div class="portlet light bordered">
            <div class="portlet-title">
                <div class="caption">
                    <i class="icon-settings font-blue"></i>
                    <span class="caption-subject font-blue sbold uppercase">编辑角色</span>
                </div>
            </div>
            <div class="row row-form">
                <div class="portlet-body form">
                    <form class="createform" role="form" action="javascript:;" method="POST" id="roleForm">
                        <input type="hidden" name="id" value="${role.id}"/>
                        <input type="hidden" name="role_type" value="${role.role_type}"/>
                        <div class="form-body">
                            <div class="alert alert-danger display-hide">
                                <button class="close" data-close="alert"></button> 表单含有错误. 请检查.
                            </div>
                            <div class="alert alert-success display-hide">
                                <button class="close" data-close="alert"></button> 表单验证通过!
                            </div>
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <div class="input-group">
                                            <label class="input-group-addon">角色编码</label>
                                            <div class="input-group-content">
                                                <input name="role_code" class="form-control" readonly placeholder="系统生成，全系统唯一（不可编辑）" value="${role.role_code}"></input>
                                            </div>
                                        </div>
                                        <div class="col-md-12">

                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <div class="input-group">
                                            <label class="input-group-addon">角色名称</label>
                                            <div class="input-group-content">
                                                <input name="role_name" class="form-control" placeholder="★ 角色名称" value="${role.role_name}"></input>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <div class="input-group">
                                            <span class="input-group-addon">角色分类</span>
                                            <div class="input-group-content">
                                                <input name="role_type" class="form-control" disabled
                                                       value="<#if role.role_type == 'ROLE_USER_CENTER'>系统角色</#if><#if role.role_type == 'ROLE_COMPANY'>公司角色</#if>"></input>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <div class="input-group">
                                            <span class="input-group-addon">所属公司</span>
                                            <div class="input-group-content">
                                                <select class="form-control" name="company_id">
                                                    <option value="${role.company_id}">${role.company_name} </option>
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <div class="input-group">
                                            <label class="input-group-addon">备  &nbsp;注 </label>
                                            <div class="input-group-content">
                                                <input name="remark" class="form-control" placeholder="备注" value="${role.remark}"></input>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-actions">
                            <div class="row" style="text-align:center;">
                                    <button type="submit" class="btn green btn-submit">保存</button>
                                    <a href="${context}/role/roleIndex" class="btn default" >返回</a>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <!-- END PAGE BASE CONTENT -->
    </div>
</@page.mainTemplate>